public class Test03 {
    static void main() {
        for(int i = 100; i >= 100 && i <= 999; ++i) {
            int g = i % 10;
            int b = i / 100;
            int s = i / 10 % 10;
            if (i == g * g * g + s * s * s + b * b * b) {
                System.out.println(i);
            }
        }
    }
}
